Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile - 保留tzdata #91

Merged
merged 2 commits into from
May 1, 2024
Merged

Dockerfile - 保留tzdata #91

merged 2 commits into from
May 1, 2024

Conversation

ky0utarou
Copy link
Contributor

@ky0utarou ky0utarou commented May 1, 2024

删除tzdata后使用date显示为UTC,安装后恢复date显示北京时间,故保留tzdata以确保日志时间正确

~ # date
Wed May  1 11:42:54 UTC 2024
~ # apk add tzdata
(1/1) Installing tzdata (2024a-r0)
OK: 130 MiB in 120 packages
~ # date
Wed May  1 19:43:00 CST 2024

@amtoaer
Copy link
Owner

amtoaer commented May 1, 2024

这样的话,可以试试把 cp 和 echo 这两条命令也删掉吗?
本来的想法是这样做就能仅保留 Asia/Shanghai 时区,如果保留 tzdata 的话这两句应该也不需要了。

@ky0utarou
Copy link
Contributor Author

应该是可以的,见https://stackoverflow.com/a/68996528

@amtoaer amtoaer merged commit 10ccb47 into amtoaer:main May 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants